package com.ruoyi.hqfinance.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.hqfinance.domain.HqAccountDealDetail;
import com.ruoyi.hqfinance.domain.vo.HqAccountDealDetailVo;
import com.ruoyi.hqfinance.mapper.HqAccountDealDetailMapper;
import com.ruoyi.hqfinance.service.HqAccountDealDetailService;
import com.ruoyi.logistic.domain.PageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HqAccountDealDetailServiceImpl implements HqAccountDealDetailService {
    @Autowired
    private HqAccountDealDetailMapper hqAccountDealDetailMapper;

    @Override
    public List<HqAccountDealDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return hqAccountDealDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(HqAccountDealDetail hqAccountDealDetail) {
        return hqAccountDealDetailMapper.insert(hqAccountDealDetail);
    }

    @Override
    public Boolean update(HqAccountDealDetail hqAccountDealDetail) {
        return hqAccountDealDetailMapper.update(hqAccountDealDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return hqAccountDealDetailMapper.deleteById(id);
    }

    @Override
    public List<HqAccountDealDetail> search(HqAccountDealDetailVo hqAccountDealDetailVo) {
        PageHelper.startPage(hqAccountDealDetailVo.getPageDate());
        return hqAccountDealDetailMapper.search(hqAccountDealDetailVo);
    }
}
